import request from '@/utils/request'

// 查询系统消息列表
export function listMsgBase(query) {
  return request({
    url: '/base/msgBase/list',
    method: 'get',
    params: query
  })
}

// 查询系统消息详细
export function getMsgBase(id) {
  return request({
    url: '/base/msgBase/' + id,
    method: 'get'
  })
}

// 保存系统消息
export function saveMsgBase(data) {
  return request({
    url: '/base/msgBase/save',
    method: 'post',
    data: data
  })
}

// 项目跟踪发送消息
export function sendReMsg(data) {
  return request({
    url: '/base/msgBase/sendReMsg',
    method: 'post',
    data: data
  })
}

// 全部已读
export function updataOneKeyReadMsgBase() {
  return request({
    url: '/base/msgBase/update/one/key/read',
    method: 'get'
  })
}
// 下个未读
export function nextUnreadMsg() {
  return request({
    url: '/base/msgBase/next/unread',
    method: 'get'
  })
}

// 查看评论
// 全部已读
export function listComment(query) {
  return request({
    url: '/base/msgBase/list/comment',
    method: 'get',
    params: query
  })
}

/**
 * 查询消息数量
 * @param query
 */
export function messageCount() {
  return request({
    url: '/base/msgBase/messageCount',
    method: 'get'
  })
}
